<%@ page contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ include file="/common/init.jsp"%>
<link href="<c:url value='/admin/css/custom.css'/>" rel="stylesheet" type="text/css" />
<link href="<c:url value='/admin/css/style.css'/>" rel="stylesheet" type="text/css" />
<link href="<c:url value='/resources/css/zTreeStyle/zTreeStyle.css'/>" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="<c:url value='/resources/js/jquery-1.7.2.min.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resources/js/jquery.ztree.all-3.5.min.js'/>"></script>

<style type="text/css">
<!--
body {
	background: #ffffff;
	margin-top:10px;
	margin-left:5px;
	margin-right:5px;
}
-->
</style>
<body>
	<div class="EpmsSubTitle"><p><b>推荐图谱</b></p>
	</div>
    <div style="padding-left: 20px;">
    	<ul id="recommendtupu" class="ztree"></ul>
    </div> 
</body>
<script type="text/javascript">
	var zTreeObj;
	var treeNodes = ${treedata};
	var setting = {
		    data: {
		        simpleData: {
		        	enable: true,
					idKey: "id",
					pIdKey: "pId",
					rootPId: 0
		        }
		    },
		    async: {
				enable: true,
				url: "${ctx}/admin/findchild.action",
				autoParam: ["id=reAccount"],
				type:"post"    //请求方式   
			}		
		};
	
	function onNodeClick(event, treeId, treeNode) {
		alert(treeNode.id + ", " + treeNode.name);
		alert(treeId);
		/* var toNodeCode = treeId.substring(0, 2);
		var toNodeCheckBox = toNodeCode + "toNodeName";
		setChoosedApUsers(); */
	}
	
	$(document).ready(function(){
		zTreeObj = $.fn.zTree.init($("#recommendtupu"), setting, treeNodes);
	});
</script>
